<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
</head>
<body onbeforeunload="return myFunction()">
<p>巴拉巴拉巴拉巴拉</p>
      
<script>
function myFunction() {
    return "我在这写点东西...";
}
</script>

</body>
</html>
